package com.chenglu.android.mine.login.mvp.contract;



import com.chenglu.android.bean.LoginBean;
import com.chenglu.android.bean.SmsCodeBean;
import com.chenglu.android.common.base.BaseView;

import io.reactivex.rxjava3.core.Observable;

/**
 * @author: lyj
 * @Created by Copyright 2023/3/2 Guangzhou Hongma Technology Co., Ltd. All rights reserved.
 *
 */
public interface LoginContract {

    /**
     *
     * @description model
     *
     */

    public interface LoginModel{

        Observable<LoginBean> getLogin(String username, String smscode,String grantType);

        //刷新的token
        Observable<LoginBean> refreshTokenLogin(String grantType,    String refresh_token);

        Observable<SmsCodeBean> getSmsCode(String mobile);

        Observable<LoginBean> getOneLogin(String accessToken,String grantType);
    }


    /**
     *
     * @description view
     *
     */

    interface View extends BaseView {
        @Override
        void showLoading();

        @Override
        void dismissLoading();

        @Override
        void onEmpty(Object tag);

        @Override
        void onError(String errMessage);

        void getLogin(LoginBean bean);

        void onRefreshLogin(LoginBean bean);

        void getSmsCode(SmsCodeBean bean);

        void getOneLogin(LoginBean bean);
    }

    /**
     *
     * @description presenter
     *
     */

    interface LoginPresenter {


        void getLogin(String username, String  smscode,String grantType);

        void refreshTokenLogin(String grantType,  String refresh_token);

        void getSmsCode(String mobile);

        void getOneLogin(String accessToken,String grantType);


    }
}